<template>
  <div>
    <el-container class="manager-container">
      <!-- this is manager page -->
      <!-- 主体区域 -->
      <el-container>
        <!-- 侧边栏区域 -->
        <el-aside width="200px">
          <el-menu
            :router="true"
            :default-active="activeMenu"
            :collapse="isCollapse"
            background-color="#C0C4CC"
            text-color="#303133"
            :unique-opened="true"
            active-text-color="#ffffff"
            :collapse-transition="false"
          >
            <!-- 一级菜单 -->
            <el-submenu :index="item.id + ''" v-for="item in menuList" :key="item.id">
              <!-- 一级菜单的模版区域 -->
              <template slot="title">
                <i :class="iconsObject[item.id]"></i>
                <span>{{ item.name }}</span>
              </template>
            </el-submenu>
          </el-menu>
        </el-aside>

      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data () {
    return {
      menuList: [
        {
          id: '1',
          name: '学籍卡片'
          // path: '/manager/course'
        }, {
          id: '2',
          name: '学籍信息管理'
        }, {
          id: '3',
          name: '学籍预警查询'
        }, {
          id: '4',
          name: '学籍异动查询'
        }, {
          id: '5',
          name: '学习完成情况'
        }
      ],
      iconsObject: {
        1: 'el-icon-user',
        2: 'el-icon-edit-outline',
        3: 'el-icon-tickets',
        4: 'el-icon-setting',
        5: 'el-icon-edit-outline'
      },
      isCollapse: false,
      activeMenu: '学籍卡片'
    }
  },
  created () {
    // console.log('')
  },
  methods: {
    Logout () {
      // 记得在这里删除token(登出就需要清除用户信息！)
      window.sessionStorage.clear()
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="less" scoped>
.manager-container {
  height: 100vh;
  background-color: #f0f1f7;

  .el-aside {
    background-color: #C0C4CC;

    .el-menu {
      border-right: none;
    }
  }
}
</style>
